package cn.qiyu5522.tk_ems.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author Tonkey
 * @since 2023-02-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_menu")
@ApiModel(value="Menu对象", description="菜单")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "菜单id")
    @TableId("id")
    private Integer id;

    @ApiModelProperty(value = "父级菜单")
    @TableField("parent_id")
    private Integer parentId;

    @ApiModelProperty(value = "标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "路径")
    @TableField("path")
    private String path;

    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "组件")
    @TableField("component")
    private String component;

    @ApiModelProperty(value = "图标")
    @TableField("icon")
    private String icon;

    @ApiModelProperty(value = "始终显示")
    @TableField("always_show")
    private Integer alwaysShow;

    @ApiModelProperty(value = "是否隐藏（0否，1是）")
    @TableField("has_hidden")
    private Integer hasHidden;

    @ApiModelProperty(value = "是否有props参数")
    @TableField("has_props")
    private Integer hasProps;

    @ApiModelProperty(value = "独享路由")
    @TableField("has_beforeEnter")
    private Integer hasBeforeenter;

    @ApiModelProperty(value = "是否有子路由")
    @TableField("has_children_node")
    private Integer hasChildrenNode;

    @ApiModelProperty(value = "重定向")
    @TableField("redirect")
    private String redirect;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "操作员编号")
    @TableField(value = "operator_id", fill = FieldFill.INSERT_UPDATE)
    private Long operatorId;

    @ApiModelProperty(value = "操作员姓名")
    @TableField(value = "operator", fill = FieldFill.INSERT_UPDATE)
    private String operator;


    public interface Update {
    }

    public interface Insert {
    }
}
